package com.atguigu02.method_lifecycle.exer;

/**
 * ClassName: HappyNewYear
 * Package: com.atguigu02.method_lifecycle.exer
 * Description:
 *
 * @Author BuTang
 * @Create 2023/5/14 21:17
 * @Version 1.0
 */
public class HappyNewYear {
    public static void main(String[] args) {
        for (int i = 10; i >= 0; i--) {
            if (i > 0) {
                try {
                    Thread.sleep(1000);
                    System.out.println(i);
                } catch (InterruptedException e) {
                    throw new RuntimeException(e);
                }
            } else if(i == 0) {
                //System.out.println(i);
                System.out.println("新年快乐");
            }
        }
    }

}

